home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-08-14 | 7.8 KB | 190 lines | [TEXT/MPS ] |
-
-
- **********************************************************************
- **********************************************************************
- *
- * File : EtherROM.a
- * Author : GN, Oct 26, 1986.
- * Description : This file contains the data structure definition
- * for the EtherNet card.
- * Mod History : MacDTS 3/29/89 - upgraded for MPW 3.0 (see below).
- * 4/12/89 - added notes to developers, fixed
- * comments in general
- *
- * NOTES: Some equates in MPW's ROMEqu file have changed. The ones
- * that affect this file are the sResource id values, which
- * have had the annoying underscore characters removed. In
- * other words:
- *
- * sRsrc_Type becomes sRsrcType in the 3.0 version of ROMEqu.a
- * sRsrc_Name becomes sRsrcName in the 3.0 version of ROMEqu.a
- * Rev1 becomes romRevision in the 3.0 version of ROMEqu.a
- *
- * The VALUES stay the same, that is:
- *
- * sRsrcType EQU 1 ;Type of sResource
- * sRsrcName EQU 2 ;Name of sResource
- * romRevision EQU 1 ;First ROM revision.
- *
- * I've changed the equates so that this file builds under 3.0
- * I also fixed the include file list to reflect 3.0 names.
- *
- * IMPORTANT NOTE: THE APPLE IMPLEMENTATION OF THIS ROM HAS
- * A TEST SRESOURCE (SRESOURCE DIR ID 129), WHICH IS AN HISTORICAL,
- * SPECIAL-PURPOSE, SPECIAL-FORMAT SRESOURCE, THAT IS ONLY USED BY
- * APPLE FOR INTERNAL TESTING PURPOSES. IT HAS BEEN REMOVED IN
- * THIS EXAMPLE, SINCE YOU DON'T NEED IT AT ALL!!! ALL THAT IS
- * REQUIRED IS THE BOARD SRESOURCE (LABELED _sRsrc_Board), AND
- * THE FUNCTIONAL SRESOURCE (LABELED _sRsrc_Ethernet)
- *
- * I've made a MacDraw II document showing the exploded Config
- * ROM (including the test sResource in case someone wants to
- * look at the ROM. You'll find it on the disk or up on
- * AppleLink...
- *
- *MB (MacDTS)
- **********************************************************************
- **********************************************************************
-
- ;Include files
- PRINT OFF
- INCLUDE 'SysErr.a' ;Macintosh System equates
- INCLUDE 'SysEqu.a' ;Macintosh System equates
- INCLUDE 'ROMEqu.a' ;Declaration ROM equates
- INCLUDE 'SlotEqu.a' ;Slot Manager equates and macros
- INCLUDE 'TimeEqu.a' ;Macintosh traps
- INCLUDE 'Traps.a' ;Macintosh traps
- INCLUDE 'DepEtherEqu.a' ;dependent EtherNet equates
-
- PRINT ON
-
-
- VideoDeclROM MAIN
- STRING C
-
-
- ;----------- sResource Directory ;<Id OF>
- sRsrc_Board EQU 1 ;Board sResource {May be any number in [0..127]}
- sRsrc_Ether EQU 128 ;EtherNet sResource {May be any number in [128..254]}
-
- ;----------- sResource Directory ;<Id OF>
- EtherAddr EQU 128 ;EtherNet Address
-
-
- EJECT
- ;*************************************************************
- ;Data Structure
- ;*************************************************************
-
- ;DEVELOPER: CHANGE THIS TO YOUR ETHERNET ADDR
- _EtherAddr DC.L $02608c00 ;This is out of the CRC check range.
- DC.L $00010000 ;This is out of the CRC check range.
-
-
- ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- ; Directory
- ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- ; <ID> <OFFSET/DATA> <ID> <OFFSET/DATA>
- _sRsrcDir OSLstEntry sRsrc_Board,_sRsrc_Board ;<sRsrc_Board> <Board sRsrc List offset>
- OSLstEntry sRsrc_Ether,_sRsrc_Ethernet ;<sRsrc_Ether> <Ethernet sRsrc List offset>
- DatLstEntry EndOfList,0 ;<EndOfList> <0>
-
-
-
- ;=============================================================
- ; sRsrc_Board List
- ;=============================================================
- ; <ID> <OFFSET/DATA> <ID> <OFFSET/DATA>
- _sRsrc_Board OSLstEntry sRsrcType,_BoardType ;<sRsrc_Type> <Board Type offset>
- OSLstEntry sRsrcName,_BoardName ;<sRsrc_Name> <Name of Board offset>
- DatLstEntry BoardId,EtherBoardId ;<BoardId> <EtherBoardId>
- OSLstEntry VendorInfo,_VendorInfo ;<VendorInfo> <_VendorInfo record offset>
- DatLstEntry EndOfList,0 ;<EndOfList> <0>
-
- ;sRsrc_Type always same for board sResource - functional
- ;sRsrc_Type varies by board function and is assigned by
- ;MacDTS
- _BoardType DC.W CatBoard ;Category = $0001 for board sResource ALWAYS
- DC.W TypBoard ;Type = $0000 for board sResource ALWAYS
- DC.L 0 ;DrvrSW and DrvrHW = $0000 for bd sResource ALWAYS
- _BoardName DC.L 'EtherNet card' ;DEVELOPER: CHANGE THIS: to the name of your board
- ;(by convention: should be board's official product name)
-
-
- ;-------------------------------------------------------------
- ; Vendor Info record (vendor/Developer specific, Apple doesn't assign)
- ;-------------------------------------------------------------
- _VendorInfo OSLstEntry VendorId,_VendorId ;<VendorId> <VendorId offset>
- OSLstEntry RevLevel,_RevLevel ;<RevLevel> <RevLevel offset>
- OSLstEntry PartNum,_PartNum ;<PartNum> <PartNum offset>
- DatLstEntry EndOfList,0 ;<EndOfList> <0>
- ;DEVELOPER: CHANGE THESE TO WHATEVER YOU WANT
- _VendorId DC.L 'Apple Computer/3 Comm' ;Vendor Id (vendor assigns. Can be anything; usually Co. name)
- _RevLevel DC.L 'B 5.0' ;Revision Level (vendor assigns)
- _PartNum DC.L 'Et-1234' ;Part Number (vendor assigns)
-
-
-
-
- EJECT
- ;=============================================================
- ; sRsrc_Ethernet
- ;=============================================================
- STRING AsIs
- ; <ID> <OFFSET/DATA> <ID> <OFFSET/DATA>
- _sRsrc_Ethernet OSLstEntry sRsrcType,_EtherType ;<sRsrc_Type> <Offset to Ethernet Type>
- OSLstEntry sRsrcName,_EtherName ;<sRsrc_Name> <Offset to Name of Ethernet sRsrc>
-
- ;Parameters
- OSLstEntry MinorBaseOS,_MinorBase ;<MinorBaseOS> <offset> {sInteger_32}
-
- DC.W (EtherAddr<<8)+$FF ;<EtherAddr> <offset>
- DC.W -*+2
-
- DatLstEntry EndOfList,0 ;<EndOfList> <0>
-
-
- STRING C ;DEVELOPER: CHANGE THIS TO WHAT DTS ASSIGNS YOU
- _EtherType DC.W CatNetwork ; category = network
- DC.W TypEtherNet ; type = ethernet
- DC.W 0 ; drvrSW = don't care
- DC.W DrHw3Com ; drvrHW = 3Com (varies by developer)
- _EtherName DC.L 'Network_Ethernet_Apple_3Com' ;DEVELOPER: CHANGE THIS
- ;By convention, this is the sRsrc_Type with the prefixes stripped off,
- ;and separated by underscores. In this example, the sRsrc_Type is:
- ;CatNetwork,TypEtherNet,DrvrSWApple,DrvrHW3Com.
- ;However, there is a minor problem. In this example, a DC.W 0
- ;was used instead of DC.W DrvrSWApple, so actually DrvrSWApple = $0000 is
- ;assumed. The string could have been used, but in there is a potential
- ;conflict, since, in ROMEqu.a, DrSwApple = $0001 is defined (for the
- ;video function sRsrc_Type: CatDisplay, TypVideo, DrSwApple, DrHwxxx)
- ;
- ;But, anyway, assuming the sRsrc_Type was really defined here as
- ;CatNetwork,TypEtherNet,DrvrSWApple,DrvrHW3Com, the name becomes
- ;Network_Ethernet_Apple_3Com (Cat, Type, DrvrSW, and DrvrSW prefixes stripped
- ;and separated by underscores
- ;
- _MinorBase DC.L $D0000 ;EtherNet RAM base.
-
-
- ; ORG ROMSize-fhBlock.fhBlockSize ;don't use
- ORG ROMSize-FHeaderRec.fhBlockSize ;fhBlock changed to FHeaderRec in mpw 3.0
- ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- ; Format/Header Block
- ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- DC.L (_sRsrcDir-*)**$00FFFFFF ;Offset to sResource directory
- DC.L ROMSize-8 ;Length of declaration data
- DC.L 0 ;CRC {Patched by crcPatch}
- DC.B romRevision ;Revision level
- DC.B AppleFormat ;Format
- DC.L TestPattern ;Test pattern
- DC.B 0 ;Reserved byte
- DC.B $A5 ;ByteLanes: 1010 0101
-
-
- ENDP
-
-
- END
-
-